package com.example.oms.dao;

import com.example.oms.entity.DiagRecords;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface DiagRecordsDao {
    DiagRecords getDiagRecordsById(int id);
    List<DiagRecords> getDiagRecordsByPatientId(int patientId);
    List<DiagRecords> getDiagRecordsByDoctorId(int doctorId);
    void newDiagRecord(@Param("diagRecord") DiagRecords diagRecord);
    int updateDiagRecord(@Param("diagRecord") DiagRecords diagRecord);

    DiagRecords getDiagRecordsByRegId(int regId);
@Select("select id from diag_records where  patient_id=#{patientId}")
    List<Integer> findIdbydoctorandpatient(String doctorId, String patientId);
}
